package com.H1023.service;

import com.H1023.dao.BookIOMapper;
import com.H1023.pojo.Book;

import java.util.List;

/**
 * @author 小强
 * @create 2021-10-11 23:11
 */
public class BookIOServiceImpl implements BookIOService {

    private BookIOMapper bookIOMapper;

    public void setBookIOMapper(BookIOMapper bookIOMapper) {
        this.bookIOMapper = bookIOMapper;
    }

    public Book queryBookByID(int id) {
        return bookIOMapper.queryBookByID(id);
    }

    public List<Book> queryBookByName(String name) {
        return bookIOMapper.queryBookByName(name);
    }
    public List<Book> queryOutedBookByName(String name) {
        return bookIOMapper.queryOutedBookByName(name);
    }

    public List<Book> queryAllBook() {
        return bookIOMapper.queryAllBook();
    }

    public int outBookByID(int id) {
        return bookIOMapper.outBookByID(id);
    }

    public int storeBook(Book book) {
        return bookIOMapper.storeBook(book);
    }

    public List<Book> queryOutedBook(){
        return bookIOMapper.queryOutedBook();
    }
    public Book queryOutedBookByID(int id){
        return bookIOMapper.queryOutedBookByID(id);
    }

    public int reStoreBookByID(int id) {
        return bookIOMapper.reStoreBookByID(id);
    }

    public int deleteBookByID(int id) {
        return bookIOMapper.deleteBookByID(id);
    }


}
